import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ty_smart_watch/page/me/setting_list.dart';
import 'package:ty_smart_watch/page/me/title.dart';
import 'package:ty_smart_watch/route/routes.dart';

import 'logout.dart';

///我的页面
///

class MePage extends StatelessWidget {
  const MePage({super.key});

  @override
  Widget build(BuildContext context) {
    return PopScope(
      canPop: false,
      onPopInvoked: (bool didPop) {
        if (didPop) {
          return; // really exit
        } else {
          Get.offNamedUntil(Routes.initial, (route) => false);
        }
      },
      child: Scaffold(
        body: ListView(
          children: [UserTitle(), SettingList(), const SizedBox(height: 60), Logout()],
        ),
      ),
    );
  }
}
